import Vue from "vue";
import App from "./App.vue";
import "./plugins/element.js";
import router from "./router";
import css from "./style.css";

Vue.config.productionTip = false;

import http from "./http";
Vue.prototype.$http = http;//在Vue中使用prototype进行设置，不能使用use设置。  axios实例调用

Vue.mixin({
  computed:{
    uploadUrl(){
      return this.$http.defaults.baseURL+'/upload'
    }
  },

  methods:{
    getAuthHeaders(){
      return{
        Authorization:`Bearer ${localStorage.token || ''}`
      }
    }
  }
})
new Vue({
  router,
  css,
  render: (h) => h(App),
}).$mount("#app");
